package demo1;

public class Test1 {

	public static void main(String[] args) {
		String str = "gfedcba";
		String s = "";
		for (int i = str.length(); i > 0 ; i--) {
			char c = str.charAt(i-1);
			s+=c;
		}
		System.out.println(s);
	}
}
